package com.zelin.rabbit.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@RabbitListener(queues = "zelin2")
@Component
public class MQListener8 {

    //1.监听得到消息
    @RabbitHandler
    public void getMessage(String message){
        System.out.println("消费者2接收到消息："+message);
    }

}
